package cn.hiapi.shopkeeper.service.order;

import cn.hiapi.basic.service.AbsBasicService;
import cn.hiapi.shopkeeper.entity.order.ActivityOrderLog;
import cn.hiapi.shopkeeper.enums.OrderLogType;
import cn.hiapi.shopkeeper.jpa.order.ActivityOrderLogJpa;
import org.springframework.stereotype.Service;

/**
 * @author AdinZ
 * @date 2023/1/1 20:16
 */
@Service
public class ActivityOrderLogService extends AbsBasicService<ActivityOrderLogJpa, ActivityOrderLog, Long> {

    /**
     * 添加系统其他日志
     *
     * @param oid
     * @param remark
     */
    public void systemLog(long oid, String remark) {
        ActivityOrderLog log = new ActivityOrderLog();
        log.setOid(oid);
        log.setRemark(remark);
        log.setType(OrderLogType.SYSTEM);

        this.save(log);
    }

}
